//
// Created by sgyt on 2020/1/22.
// atexit 函数能绑定退出函数
#include <stdio.h>
#include <stdlib.h>
void my_exit1()
{
    printf("this is exit1\n");
}
void my_exit2()
{
    printf("this is exit2\n");
}
void my_exit3()
{
    printf("this is exit3\n");
}

int main(int argc,char *argv[])
{
    //函数调用先进后出
    atexit(my_exit1);
    atexit(my_exit2);
    atexit(my_exit3);
    exit(0);
}